package com.jl.model.niuniu.enums;

/*
特殊牌型
 */
public enum SpecialCardType {

    type1("1",10,"同花顺(10倍)"),
    type2("2",9,"一条龙(9倍)"),
    type3("3",9,"五小牛(9倍)"),
    type4("4",8,"炸弹牛(8倍)"),
    type5("5",7,"葫芦牛(7倍)"),
    type6("6",6,"同花牛(6倍)"),
    type7("7",5,"顺子牛(5倍)"),
    type8("8",5,"金花牛(5倍)"),
    type9("9",5,"银牛(5倍)"),
    type10("10",4,"比翼牛(4倍)");

    private String id;
    private Integer value;
    private String desc;

    SpecialCardType(String id, Integer value, String desc) {
        this.id = id;
        this.value = value;
        this.desc = desc;
    }

    public String getId() {
        return id;
    }

    public Integer getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    public static int getEnumById(String id){
        SpecialCardType[] values = SpecialCardType.values();
        for (SpecialCardType value : values) {
            if (id.equals(value.getId())){
                return value.getValue();
            }
        }
        return 0;
    }
}
